﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uscChangePassSales.ascx.cs" Inherits="WebUserControl_uscChangePassSales" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


<script type="text/javascript">
     function pageLoad() {
      $("#<%= btnChangePass.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
       
        
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
             <fieldset>
                    <legend>Cập nhật mật khẩu</legend>
                     <div class="fm-req">
                       <label for="txtMaTuVanVien">Mã BA:</label>
                       <asp:TextBox ID="lblMaTVV" BackColor="Yellow" runat="server" ReadOnly="True" Width="150px"></asp:TextBox>
                   </div>
                   <div class="fm-req">
                       <label for="txtMaTuVanVien">Họ tên BA:</label>
                       <asp:TextBox ID="lblTenTVV" BackColor="Yellow" runat="server" ReadOnly="True" Width="150px"></asp:TextBox>
                   </div>
                    <div class="fm-req">
                       <label for="txtMaTuVanVien">Mật khẩu cũ:</label>
                       <asp:TextBox ID="txtOldPass" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                       <asp:RequiredFieldValidator ControlToValidate="txtOldPass" Display="None"  ID="RequiredFieldValidator1" runat="server" ErrorMessage="Phải nhập mật khẩu cũ">
                       </asp:RequiredFieldValidator>
                       <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator1" ID="ValidatorCalloutExtender1" runat="server">
                       </cc1:ValidatorCalloutExtender>
                   </div>
                    <div class="fm-req">
                       <label for="txtMaTuVanVien">Mật khẩu mới:</label>
                        <asp:TextBox ID="txtNewPass" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                       <asp:RequiredFieldValidator ControlToValidate="txtNewPass" Display="None"  ID="RequiredFieldValidator3" runat="server" ErrorMessage="Phải nhập mật khẩu mới">
                       </asp:RequiredFieldValidator>
                       <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator3" ID="ValidatorCalloutExtender2" runat="server">
                       </cc1:ValidatorCalloutExtender>
                   </div>
                   <div class="fm-req">
                       <label for="txtMaTuVanVien">Xác nhận lại:</label>
                       <asp:TextBox ID="txtCurPass" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                       <asp:CompareValidator ID="CompareValidator1" Display="None" runat="server"  ControlToCompare="txtNewPass" ControlToValidate="txtCurPass" ErrorMessage="Không chính xác mật khẩu mới" 
                         ValidationGroup="CheckText"></asp:CompareValidator>
                       <cc1:ValidatorCalloutExtender TargetControlID="CompareValidator1" ID="ValidatorCalloutExtender3" runat="server">
                       </cc1:ValidatorCalloutExtender>
                   </div>
                   <asp:Button ID="btnChangePass" runat="server" Text="Thay đổi mật khẩu"   onclick="btnChangePass_Click" ValidationGroup="CheckText" />
            </fieldset>
     
    </ContentTemplate>
</asp:UpdatePanel>
 <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />
